<template>
  <header class="app-bar">
    <!-- ios app顶部安全距离预留块 -->
    <div
      class="safe-top"
      :style="{ height: globalConfig.ui.safeTop + 'px' }"
    ></div>
    <!-- bar主内容 -->
    <div class="bar-content">
      <div class="bar-left">
        <slot name="left"></slot>
      </div>
      <div class="bar-center">
        <slot name="center"></slot>
      </div>
    </div>
  </header>
</template>

<script>
export default {
  name: "appBar",
  props: {
  },
  data() {
    return {};
  },
  computed: {}
};
</script>

<style lang="scss" scoped>
.app-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  background-color: $color-theme-light;
  z-index: $zIndex-app-bar;
}
.bar-content {
  @include display-flex;
  width: 100vw;
  padding: 0 20px;
  height: $height-app-bar;
  background-color: transparent;
  .bar-center {
    @include display-flex;
    flex: 1;
    font-size: 18px;
    color: #333333;
  }
}
</style>
